﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Content;

using uam_fps_game.Scenes;
using uam_fps_game.Gfx;
using uam_fps_game.Cameras;
using uam_fps_game.Utils;
using uam_fps_game.Physics;

namespace uam_fps_game.Views
{
    public class GameView : View
    {
        Scene mScene;

        static public ContentManager contentManager;

        public override void Load(GraphicsDevice device, IServiceProvider serviceProvider)
        {
            base.Load(device, serviceProvider);

            contentManager = new ContentManager(serviceProvider, "Content");
            GraphicsSystem.Global = new GraphicsSystem(device, serviceProvider);
            PhysicsSystem.Global = new PhysicsSystem();

            mScene = Scene.CreateTestScene(device, contentManager, false);
        }

        

        public override void Unload()
        {
        }

        public override void Update(float deltaTime)
        {
            mScene.Update(deltaTime);
        }

        public override void Draw()
        {
            mDevice.Clear(Color.BurlyWood);

            mScene.Render();

        }
    }
}
